<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // function Obj () {
        //     this.name = "document";
        //     this.age = 18;
            
        // }
        // Obj.prototype.say = function () {
        //     console.log("hello");
        // }

        // Obj.prototype.sex = 'sex';

        // var obj = new Obj();

        // Object.defineProperty(obj, 'name', {
        //     writable: true,
        //     configurable: true,
        //     enumerable: false, // 是否可以被枚举
        //     value: 'document'
        // })

        // for (var i in obj) {
        //     console.log(i);
        // }
        
        class Parent {
            state = 'hello'
            constructor (name) {
                this.name = name
                console.log('🚀 ~ This is a result of console.log ~ ✨: ', this.get);
            }

            get () {
                console.log('hello');
            }
        }

        const p = new Parent('parent')
        console.log('🚀 ~ This is a result of console.log ~ ✨: ', p);
        
    </script>
</body>
</html>
